import 'dart:ui';

import 'package:yuan_hang_app/res/w_colors.dart';

class orderManagerModel {
  static Color exchangeStatus(status) {
    Color color = WColors.green;
    if (status == "已保存") {
      color = WColors.green;
    } else if (status == "支付中") {
      color = WColors.orange;
    } else if (status == "已下定") {
      color = WColors.CFA5051;
    } else if (status == "已取消") {
      color = WColors.CCCCCCC;
    }
    return color;
  }

  static Map exchangeMatchStatus(code) {
    Map status = {"color": WColors.redMain, "title": "已配"};
    if (code == "401101") {
      status = {"color": WColors.redMain, "title": "已配"};
    } else if (code == "401102") {
      status = {"color": WColors.green, "title": "未配"};
    } else if (code == "401103") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    }
    return status;
  }

  static Map exchangeCarStatus(code) {
    Map status = {"color": WColors.redMain, "title": "已配"};
    if (code == "400901") {
      status = {"color": WColors.redMain, "title": "已配"};
    } else if (code == "400904") {
      status = {"color": WColors.green, "title": "未配"};
    } else if (code == "400905") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    } else if (code == "400908") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    } else if (code == "400909") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    } else if (code == "400910") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    } else if (code == "400911") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    } else if (code == "400912") {
      status = {"color": WColors.hintTextColor, "title": "配车取消"};
    }
    return status;
  }
}
